<html>
<head><meta charset="utf-8"><title>What is &quot;rss&quot; in -Ztime-passes? · t-compiler/help · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/index.html">t-compiler/help</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20is.20.22rss.22.20in.20-Ztime-passes.3F.html">What is &quot;rss&quot; in -Ztime-passes?</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="209197159"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20is%20%22rss%22%20in%20-Ztime-passes%3F/near/209197159" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20is.20.22rss.22.20in.20-Ztime-passes.3F.html#209197159">(Sep 05 2020 at 21:42)</a>:</h4>
<p>e.g.</p>
<div class="codehilite"><pre><span></span><code>time: 0.002; rss: 56MB  parse_crate
time: 0.000; rss: 56MB  attributes_injection
time: 0.000; rss: 56MB  recursion_limit
time: 0.000; rss: 56MB  plugin_loading
time: 0.000; rss: 56MB  plugin_registration
time: 0.000; rss: 56MB  pre_AST_expansion_lint_checks
time: 0.000; rss: 56MB  crate_injection
time: 0.003; rss: 69MB  expand_crate
time: 0.000; rss: 69MB  check_unused_macros
time: 0.003; rss: 69MB  macro_expand_crate
time: 0.000; rss: 69MB  maybe_building_test_harness
time: 0.000; rss: 70MB  AST_validation
time: 0.000; rss: 70MB  maybe_create_a_macro_crate
time: 0.000; rss: 70MB  complete_gated_feature_checking
time: 0.003; rss: 70MB  configure_and_expand
time: 0.000; rss: 70MB  prepare_outputs
time: 0.000; rss: 72MB  hir_lowering
time: 0.000; rss: 72MB  early_lint_checks
time: 0.000; rss: 74MB  setup_global_ctxt
time: 0.000; rss: 74MB  dep_graph_tcx_init
time: 0.000; rss: 74MB  create_global_ctxt
time: 0.000; rss: 76MB  looking_for_entry_point
time: 0.000; rss: 76MB  looking_for_plugin_registrar
time: 0.000; rss: 76MB  looking_for_derive_registrar
time: 0.000; rss: 79MB  misc_checking_1
time: 0.000; rss: 79MB  type_collecting
time: 0.000; rss: 79MB  impl_wf_inference
time: 0.000; rss: 79MB  unsafety_checking
time: 0.000; rss: 79MB  orphan_checking
time: 0.000; rss: 79MB  coherence_checking
time: 0.001; rss: 85MB  wf_checking
time: 0.000; rss: 85MB  item_types_checking
time: 0.004; rss: 89MB  item_bodies_checking
time: 0.005; rss: 89MB  type_check_crate
time: 0.013; rss: 89MB  match_checking
time: 0.000; rss: 89MB  liveness_and_intrinsic_checking
time: 0.013; rss: 89MB  misc_checking_2
time: 0.007; rss: 98MB  MIR_borrow_checking
time: 0.000; rss: 98MB  MIR_effect_checking
time: 0.000; rss: 98MB  layout_testing
time: 0.000; rss: 99MB  death_checking
time: 0.000; rss: 99MB  unused_lib_feature_checking
time: 0.000; rss: 99MB  crate_lints
time: 0.000; rss: 99MB  module_lints
time: 0.000; rss: 99MB  lint_checking
time: 0.000; rss: 99MB  privacy_checking_modules
time: 0.001; rss: 99MB  misc_checking_3
time: 0.000; rss: 99MB  monomorphization_collector_root_collections
time: 0.007; rss: 124MB monomorphization_collector_graph_walk
time: 0.000; rss: 124MB partition_and_assert_distinct_symbols
time: 0.000; rss: 128MB write_allocator_module
time: 0.000; rss: 128MB find_cgu_reuse
time: 0.000; rss: 129MB LLVM_module_optimize_function_passes(rust_out.7rcbfp3g-cgu.0)
time: 0.000; rss: 129MB LLVM_module_optimize_module_passes(rust_out.7rcbfp3g-cgu.0)
time: 0.000; rss: 131MB LLVM_module_optimize_function_passes(rust_out.7rcbfp3g-cgu.2)
time: 0.000; rss: 131MB LLVM_module_optimize_module_passes(rust_out.7rcbfp3g-cgu.2)
time: 0.000; rss: 131MB LLVM_module_optimize_function_passes(rust_out.7rcbfp3g-cgu.1)
time: 0.000; rss: 131MB LLVM_module_optimize_module_passes(rust_out.7rcbfp3g-cgu.1)
time: 0.000; rss: 133MB LLVM_module_optimize_function_passes(rust_out.7rcbfp3g-cgu.3)
time: 0.000; rss: 133MB LLVM_module_optimize_module_passes(rust_out.7rcbfp3g-cgu.3)
time: 0.000; rss: 134MB LLVM_module_optimize_function_passes(rust_out.7rcbfp3g-cgu.4)
time: 0.000; rss: 134MB LLVM_module_optimize_module_passes(rust_out.7rcbfp3g-cgu.4)
time: 0.004; rss: 134MB codegen_to_LLVM_IR
time: 0.000; rss: 134MB assert_dep_graph
time: 0.000; rss: 134MB serialize_dep_graph
time: 0.000; rss: 134MB LLVM_module_optimize_function_passes(rust_out.7rcbfp3g-cgu.5)
time: 0.013; rss: 134MB codegen_crate
time: 0.000; rss: 136MB LLVM_module_optimize_module_passes(rust_out.7rcbfp3g-cgu.5)
time: 0.000; rss: 106MB LLVM_module_optimize_function_passes(rust_out.7rcbfp3g-cgu.6)
time: 0.000; rss: 106MB LLVM_module_optimize_module_passes(rust_out.7rcbfp3g-cgu.6)
time: 0.001; rss: 106MB free_global_ctxt
time: 0.005; rss: 108MB LLVM_passes(crate)
time: 0.000; rss: 108MB join_worker_thread
time: 0.001; rss: 108MB finish_ongoing_codegen
time: 0.000; rss: 108MB serialize_work_products
time: 0.000; rss: 108MB link_binary_check_files_are_writeable
time: 0.102; rss: 108MB run_linker
time: 0.000; rss: 108MB link_binary_remove_temps
time: 0.103; rss: 108MB link_binary
time: 0.103; rss: 108MB link_crate
time: 0.000; rss: 108MB llvm_dump_timing_file
time: 0.104; rss: 108MB link
time: 0.153; rss: 108MB     total
</code></pre></div>



<a name="209197169"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20is%20%22rss%22%20in%20-Ztime-passes%3F/near/209197169" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20is.20.22rss.22.20in.20-Ztime-passes.3F.html#209197169">(Sep 05 2020 at 21:43)</a>:</h4>
<p>resident set size</p>



<a name="209197170"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20is%20%22rss%22%20in%20-Ztime-passes%3F/near/209197170" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20is.20.22rss.22.20in.20-Ztime-passes.3F.html#209197170">(Sep 05 2020 at 21:43)</a>:</h4>
<p>memory usage</p>



<a name="209197175"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20is%20%22rss%22%20in%20-Ztime-passes%3F/near/209197175" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20is.20.22rss.22.20in.20-Ztime-passes.3F.html#209197175">(Sep 05 2020 at 21:43)</a>:</h4>
<p>Aha, thank you.</p>



<a name="209197566"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20is%20%22rss%22%20in%20-Ztime-passes%3F/near/209197566" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20is.20.22rss.22.20in.20-Ztime-passes.3F.html#209197566">(Sep 05 2020 at 21:57)</a>:</h4>
<p>Do you find this result surprising? I did, somewhat.</p>
<div class="codehilite"><pre><span></span><code>$ <span class="k">for</span> K in <span class="o">{</span><span class="m">8</span>..16<span class="o">}</span><span class="p">;</span> <span class="k">do</span>
  <span class="nv">N</span><span class="o">=</span><span class="k">$((</span><span class="m">1</span> &lt;&lt; K<span class="k">))</span>
  <span class="nb">echo</span> -n <span class="s2">&quot;</span><span class="k">$((</span>N<span class="k">))</span><span class="s2">: &quot;</span>
  python -c <span class="s2">&quot;print(&#39;fn main() { match 0 { %s _ =&gt; {} } }&#39; % &#39;&#39;.join(&#39; %s =&gt; {}&#39; % n for n in xrange(0, </span><span class="nv">$N</span><span class="s2">)))&quot;</span> <span class="p">|</span>
    rustc - -Z time-passes <span class="p">|</span>
    rg --color never <span class="s1">&#39;match&#39;</span>
<span class="k">done</span>
<span class="m">256</span>: time: <span class="m">0</span>.001<span class="p">;</span> rss: 88MB match_checking
<span class="m">512</span>: time: <span class="m">0</span>.004<span class="p">;</span> rss: 89MB match_checking
<span class="m">1024</span>: time: <span class="m">0</span>.013<span class="p">;</span> rss: 89MB    match_checking <span class="c1"># huh, rss is almost constant up to here</span>
<span class="m">2048</span>: time: <span class="m">0</span>.046<span class="p">;</span> rss: 93MB    match_checking
<span class="m">4096</span>: time: <span class="m">0</span>.179<span class="p">;</span> rss: 96MB    match_checking
<span class="m">8192</span>: time: <span class="m">0</span>.715<span class="p">;</span> rss: 103MB   match_checking
<span class="m">16384</span>: time: <span class="m">3</span>.152<span class="p">;</span> rss: 118MB  match_checking
<span class="m">32768</span>: time: <span class="m">11</span>.660<span class="p">;</span> rss: 148MB match_checking
<span class="m">65536</span>: time: <span class="m">55</span>.046<span class="p">;</span> rss: 206MB match_checking
</code></pre></div>



<a name="209197757"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20is%20%22rss%22%20in%20-Ztime-passes%3F/near/209197757" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mario Carneiro <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20is.20.22rss.22.20in.20-Ztime-passes.3F.html#209197757">(Sep 05 2020 at 22:04)</a>:</h4>
<p>the times and iterations increase exponentially though</p>



<a name="209198208"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20is%20%22rss%22%20in%20-Ztime-passes%3F/near/209198208" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20is.20.22rss.22.20in.20-Ztime-passes.3F.html#209198208">(Sep 05 2020 at 22:20)</a>:</h4>
<p>Yeah, that doesn't seem surprising given that RSS is rounded to MB.</p>



<a name="209198211"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20is%20%22rss%22%20in%20-Ztime-passes%3F/near/209198211" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20is.20.22rss.22.20in.20-Ztime-passes.3F.html#209198211">(Sep 05 2020 at 22:21)</a>:</h4>
<p>I'd guess if RSS was written out as bytes, you'd see it growing slowly the same way time does.</p>



<a name="209199091"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20is%20%22rss%22%20in%20-Ztime-passes%3F/near/209199091" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20is.20.22rss.22.20in.20-Ztime-passes.3F.html#209199091">(Sep 05 2020 at 22:51)</a>:</h4>
<p>I'm mostly surprised it has the same ~88mb overhead at first at that point in the program.</p>



<a name="209199094"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20is%20%22rss%22%20in%20-Ztime-passes%3F/near/209199094" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20is.20.22rss.22.20in.20-Ztime-passes.3F.html#209199094">(Sep 05 2020 at 22:51)</a>:</h4>
<p>That's total memory usage</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>